package gui;


import java.io.IOException;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

import tuio.libTUIO.src.TUIO.TuioClient;


/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class LinearWallOnlyMain {

	static int port = 3333;


	/**
	 * @param args
	 */
	public static void main(String[] args) {

		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				IHM ihm = new IHM(false);
				ihm.setLinkedWithCineSys(false);
				
				TuioClient client = new TuioClient();
				System.out.println("listening to TUIO messages at port "+port);
				client.addTuioListener(ihm);
				client.connect();

				ihm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				ihm.pack();
				ihm.setVisible(true);

				try {
					Runtime.getRuntime().exec("cmd.exe /c start Touch2Tuio\\x64\\Release\\Touch2Tuio_x64.exe VirtualDirector");
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		});
	}

}
